package com.example.job.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.job.domain.ExamVO;
import com.example.job.domain.UserExam;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 23050
 * @version 1.0
 * @description: TODO
 * @date 2025/3/11 19:52
 */
public interface UserExamMapper extends BaseMapper<UserExam> {


    //根据userid查询报名的所有竞赛
    List<ExamVO> selectUserExamList(Long userId);

    //查询有那些用户报名过竞赛
    @Select("SELECT DISTINCT user_id FROM tb_user_exam")
    List<Long> selectDistinctUserIds();


}
